home *** CD-ROM | disk | FTP | other *** search
/ Multimedia Jumpstart / Multimedia Microsoft Jumpstart Version 1.1a (Microsoft).BIN / develpmt / drivers / mscdex / audio / send.asm < prev   
Encoding:
Assembly Source File  |  1990-10-15  |  1.3 KB  |  51 lines

  1. ; SEND.ASM
  2. ;
  3. ; Simple asm routine to take packaged request from C, point to it
  4. ; with ES:BX, and send it to the device driver.
  5. ;
  6. ; 10/01/90 Final (v1.0) JohnYG
  7.  
  8. ?PLM = 0        ; Use C calling conventions
  9. ?WIN = 0        ; We're not windows
  10. include cmacros.inc
  11.  
  12. sysdev  struc
  13. sdevnext        dd      ?       ;Pointer to next device header
  14. sdevatt         dw      ?       ;Attributes of the device
  15. sdevstrat       dw      ?       ;Strategy entry point
  16. sdevint         dw      ?       ;Interrupt entry point
  17. sdevname        db      8 dup (?) ;Name of device (only first byte used for block)
  18. sysdev  ends
  19.  
  20. sBegin data
  21. dev_strat       dd      ?
  22. dev_int         dd      ?
  23. sEnd   data
  24.  
  25. sBegin code
  26.         assumes cs, code
  27.         assumes ds, data
  28.  
  29. cProc   send_req, PUBLIC, <si, di>
  30. parmW   req
  31. parmW   reqseg
  32. parmW   drv
  33. parmW   drvseg
  34. cBegin  send_req
  35.         mov     es,drvseg
  36.         mov     word ptr dev_strat+2,es
  37.         mov     word ptr dev_int+2,es
  38.         mov     bx,drv
  39.         mov     ax,es:[bx].sdevstrat
  40.         mov     word ptr dev_strat,ax
  41.         mov     ax,es:[bx].sdevint
  42.         mov     word ptr dev_int,ax
  43.  
  44.         mov     bx,req
  45.         mov     es,reqseg
  46.         call    dword ptr [dev_strat]
  47.         call    dword ptr [dev_int]
  48. cEnd    send_req
  49. sEnd    code
  50. end
  51.